package demo5;

import java.util.ArrayList;
import java.util.List;

// 菜品管理
class DishManagement {
    private int merchantId;
    private int dishId;
    private String dishName;
    private String dishDescription;
    private String dishComposition;
    private double price;

    public DishManagement(int merchantId, int dishId, String dishName, String dishDescription, String dishComposition, double price) {
        this.merchantId = merchantId;
        this.dishId = dishId;
        this.dishName = dishName;
        this.dishDescription = dishDescription;
        this.dishComposition = dishComposition;
        this.price = price;
    }

    // 菜品添加（可在构造函数完成，此方法可根据实际扩展）
    public void addDish() {
        // 可添加具体逻辑
    }

    // 菜品修改
    public void modifyDish(String dishName, String dishDescription, String dishComposition, double price) {
        this.dishName = dishName;
        this.dishDescription = dishDescription;
        this.dishComposition = dishComposition;
        this.price = price;
    }

    // 菜品查询
    public String getDishInfo() {
        return "Merchant ID: " + merchantId + ", Dish ID: " + dishId + ", Dish Name: " + dishName +
                ", Description: " + dishDescription + ", Composition: " + dishComposition +
                ", Price: " + price;
    }

    // 菜品删除（可通过标记删除等方式实现）
    public void deleteDish() {
        // 可添加具体逻辑
    }

    // Getters 和 Setters
    public int getMerchantId() {
        return merchantId;
    }

    public int getDishId() {
        return dishId;
    }

    public String getDishName() {
        return dishName;
    }

    public String getDishDescription() {
        return dishDescription;
    }

    public String getDishComposition() {
        return dishComposition;
    }

    public double getPrice() {
        return price;
    }
}
